package com.tang.sys.controller;

import com.tang.sys.ResponseResult;
import com.tang.sys.service.IUploadService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;

//@RestController
public class UploadController {

    @Autowired
    private IUploadService iUploadService;

    @PostMapping("/upload")
    public ResponseResult uploadImg(@RequestParam("img") MultipartFile multipartFile) {
        return iUploadService.uploadImg(multipartFile);
    }
}
